from selenium import webdriver
from selenium.webdriver.edge.service import Service
from webdriver_manager.microsoft import EdgeChromiumDriverManager

#创建一个浏览器驱动对象
class Driver:
    driver = ""
    url = ""
    def __init__(self):
        options = webdriver.EdgeOptions()
        self.driver = webdriver.Edge(service= Service(EdgeChromiumDriverManager().install()),options=options)


#使用单例模式创建一个全局对象
ForumDriver = Driver()